package com.cc.demo.Mapper;

import com.cc.demo.model.City;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CityMapper {
    @Select("SELECT id, name, state, country FROM city WHERE state = #{state}")
    City findByState(String state);

    @Select("SELECT id, name, state, country FROM city")
    List<City> findAll();
}
